import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Scripts from '../views/Scripts.vue'
import Placeholder from '../views/Placeholder.vue'
import DIY from '../views/PuppetDIY.vue'
import Player from '../views/VideoPlay.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/scripts',
      name: 'scripts',
      component: Scripts
    },
    {
      path: '/video/:id',
      name: 'video',
      component: () => import('../views/Video.vue')
    },
    {
      path: '/news/:id',
      name: 'news-detail',
      component: () => import('../views/NewsDetail.vue')
    },
    {
      path: '/resources',
      name: 'resources',
      component: Placeholder,
      props: { pageName: '文化资源' }
    },
    {
      path: '/diy',
      name: 'diy',
      component: DIY,
      props: { pageName: '木偶形象DIY' }
    },
    {
      path: '/music',
      name: 'music',
      component: Player,
      props: { pageName: '曲目点播' }
    },
    {
      path: '/chat',
      name: 'chat',
      component: Placeholder,
      props: { pageName: '和大模型对话' }
    }
  ]
})

export default router
